Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Fixes terminology inconsistencies that could mislead contributors about workspace identity vs directory naming.

Changes

Parameter renaming:

  • config.getWorkspacePath(workspaceId) β†’ getWorkspacePath(directoryName)
  • CreateWorktreeOptions.workspaceId β†’ directoryName

Documentation:

  • Clarified "Workspace Path Architecture" in config.ts to separate workspace ID (stable identifier) from directory name (branch name)
  • Removed outdated symlink references (directories use workspace names directly now)

Test fixtures:

  • Updated App.stories.tsx to use hex-like IDs (e.g., 1a2b3c4d5e) matching production format

All changes are non-functional: comments, docs, parameter names, and test fixtures only.

Generated with cmux

- Updated config.ts to clarify generateWorkspaceId is ONLY for legacy support
- Fixed debug/git-status.ts to not suggest project-branch ID format
- Updated App.stories.tsx mock IDs to use stable ID format (10 hex chars)
- Added clarifying comments to E2E test fixtures
- Documented that workspace IDs must come from backend, never constructed in frontend

The generateWorkspaceId method is kept for:
- Legacy workspace lookup (users may have old workspaces)
- E2E test backward compatibility
- Debug script legacy support
Debug commands are internal dev tools and don't need backward compatibility.

- debug/list-workspaces.ts: Display actual workspace ID from config instead of generating legacy IDs
- debug/agentSessionCli.ts: Require --workspace-id instead of deriving from project path

This eliminates any suggestion that workspace IDs can be constructed from project/branch names.
Makes the legacy-only purpose explicit in the method name.

- Renamed method in Config class
- Updated all call sites in config.ts (4 locations)
- Updated E2E test fixtures
- Updated config.test.ts

All tests pass.
Fixes terminology and documentation inconsistencies that could mislead
contributors about workspace identity, directory naming, and path construction.

Changes:
- Renamed config.getWorkspacePath parameter from 'workspaceId' to 'directoryName'
  to reflect that it accepts workspace.name (branch name), not the stable ID
- Updated 'Workspace Path Architecture' docs in config.ts to clearly separate:
  β€’ Worktree directory name: uses workspace.name (branch name)
  β€’ Workspace ID: stable random identifier for identity and sessions
- Renamed CreateWorktreeOptions.workspaceId β†’ directoryName in git.ts
- Removed outdated 'symlink' references across components, types, and tests
  (worktree directories now use workspace names directly, no symlinks)
- Updated App.stories.tsx fixtures to use hex-like IDs (e.g., '1a2b3c4d5e')
  instead of 'project-branch' format to match production ID generation

All changes are documentation, comments, parameter names, and test fixtures.
No functional changes to runtime behavior.
@ammario ammario added this pull request to the merge queue Oct 25, 2025
Merged via the queue into main with commit 6db7e18 Oct 25, 2025
13 checks passed
@ammario ammario deleted the id-misconception branch October 25, 2025 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants